package com.example.demo.Service.TeacherService;

import com.example.demo.Model.Course;
import com.example.demo.Repository.CourseRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseServiceImpl implements CourseService{
    @Autowired
    private CourseRepository corepository;

    @Override
    public List<Course> findAll() {
        return corepository.findAll();
    }

    @Override
    public void save(Course course) {
        corepository.save(course);
    }

    @Override
    public List<Course> findByConame(String coname) {
        return corepository.findByConame(coname);
    }

}
